package com.sky.controller.admin;

import com.sky.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页控制器
 */
@RestController
@Slf4j
@Api(tags = "首页接口")
public class IndexController {

    /**
     * 健康检查接口
     */
    @GetMapping("/")
    @ApiOperation("健康检查")
    public Result<String> index() {
        log.info("访问根路径");
        return Result.success("苍穹外卖后端服务运行正常！");
    }

    /**
     * 健康检查接口
     */
    @GetMapping("/health")
    @ApiOperation("健康检查")
    public Result<String> health() {
        log.info("健康检查");
        return Result.success("OK");
    }
}
